package com.blb.service.impl;

import com.blb.entity.Settlement;
import com.blb.mapper.SettlementMapper;
import com.blb.service.ISettlementService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yanghao
 * @since 2019-11-22
 */
@Service
public class SettlementServiceImpl extends ServiceImpl<SettlementMapper, Settlement> implements ISettlementService {

    @Resource
    private SettlementMapper settlementMapper;

    @Override
    public int getAllCount(String freightId,String  companyId) {
        return settlementMapper.getAllCount(freightId,companyId);
    }

    @Override
    public List<Settlement> findAll(String freightId,String  companyId, int start, int length) {
        return settlementMapper.findAll(freightId,companyId, start, length);
    }

    @Override
    public void updateStatus(String id) {
        settlementMapper.updateStatus(id);
    }

    @Override
    public void addSettlement(Settlement settlement) {
        settlementMapper.addSettlement(settlement);
    }
}
